{extend name="base" /}{block name="seo"}
<title>我的收藏 - {$site.name}</title>
<meta name="keywords" content="{$site.keywords}">
<meta name="description" content="{$site.description}">
{/block}
{block name="css"}
<link href="__HOME__/css/user.css" rel="stylesheet" type="text/css">
{/block}
{block name="body"}
<div class="container">
    <div class="user">
        {include file="index/menu"}


        <div class="user-stow user-box fl">
                <div class="title">
                    收藏管理
                    <span>您总共收藏了 <b id="count">0</b> 篇文章。</span>
                </div>
                <div class="list">
                    <ul id="page_body_id" style="min-height: 480px">
                    </ul>
                    <p id="page_id" style="text-align: center"></p>
                 </div>



    </div>
</div>

{/block}
{block name="script"}
    <script id="page_template_id" type= "text/html">
        {{# layui.each(d.list, function(index, item){ }}
        <li>
            <time>{{item.create_time}}</time>
            <a href="{{item.url}}" class="tit" target="_blank">
                {{item.subject_title}}</a>
            <a href="{{item.url}}" class="link" target="_blank">查看 &gt;</a>
            <span><a href="javascript:;" class="favorite-del del" data-title="{{item.subject_title}}" data-id="{{item.id}}">移除
							</a></span>
        </li>
        {{# }); }}
    </script>
<script>

    $('body').on('click', '.favorite-del', function () {
        var $this=$(this);
        request({
            url: config.api.user_common_del,data:{subject:'favorite',id:$this.data('id')}
        });
    })

        renderPageData( '/api/user/subjects',"page_id", "page_template_id" ,
            "#page_body_id" ,'count',{subject:'favorite'});


</script>
{/block}
